#!/usr/bin/env python
# -*- coding:utf8 -*-
from squirrel_core.item.base_item import BaseItem
from scrapy import item, Field

__all__ = ["PageUnreachableItem"]


class PageUnreachableItem(BaseItem):
    proxy = Field()  # 非必填
    proxy_source = Field()

    def process_item(self, *args, **kwargs):
        """
            pop parsed data to outside dict and return dict
        Args:
            *args:
            **kwargs:
        Returns:
            dict value
        """
        result = dict(self)
        return {
            "source_monitor_type": 2,
            "content": result
        }
